Optimal. Leaf size=61 \[ -\frac {3 i a^3 \sec (c+d x)}{d}-\frac {3 a^3 \tanh ^{-1}(\sin (c+d x))}{d}-\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^2}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {3496, 3486, 3770} \[ -\frac {3 i a^3 \sec (c+d x)}{d}-\frac {3 a^3 \tanh ^{-1}(\sin (c+d x))}{d}-\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^2}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3486
Rule 3496
Rule 3770
Rubi steps
\begin {align*} \int \cos (c+d x) (a+i a \tan (c+d x))^3 \, dx &=-\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^2}{d}-\left (3 a^2\right ) \int \sec (c+d x) (a+i a \tan (c+d x)) \, dx\\ &=-\frac {3 i a^3 \sec (c+d x)}{d}-\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^2}{d}-\left (3 a^3\right ) \int \sec (c+d x) \, dx\\ &=-\frac {3 a^3 \tanh ^{-1}(\sin (c+d x))}{d}-\frac {3 i a^3 \sec (c+d x)}{d}-\frac {2 i a \cos (c+d x) (a+i a \tan (c+d x))^2}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.82, size = 123, normalized size = 2.02 \[ \frac {a^3 \cos ^2(c+d x) (\tan (c+d x)-i)^3 \left ((-\cos (2 c-d x)+i \sin (2 c-d x)) (5 \cos (c+d x)-i \sin (c+d x))+6 (\sin (3 c)+i \cos (3 c)) \cos (c+d x) \tanh ^{-1}\left (\cos (c) \tan \left (\frac {d x}{2}\right )+\sin (c)\right )\right )}{d (\cos (d x)+i \sin (d x))^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.55, size = 107, normalized size = 1.75 \[ \frac {-4 i \, a^{3} e^{\left (3 i \, d x + 3 i \, c\right )} - 6 i \, a^{3} e^{\left (i \, d x + i \, c\right )} - 3 \, {\left (a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) + 3 \, {\left (a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right )}{d e^{\left (2 i \, d x + 2 i \, c\right )} + d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 3.83, size = 234, normalized size = 3.84 \[ \frac {63 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - 33 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 63 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + 33 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 128 i \, a^{3} e^{\left (3 i \, d x + 3 i \, c\right )} - 192 i \, a^{3} e^{\left (i \, d x + i \, c\right )} + 63 \, a^{3} \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - 33 \, a^{3} \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 63 \, a^{3} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + 33 \, a^{3} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right )}{32 \, {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.37, size = 101, normalized size = 1.66 \[ -\frac {i a^{3} \left (\sin ^{4}\left (d x +c \right )\right )}{d \cos \left (d x +c \right )}-\frac {i a^{3} \left (\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{d}-\frac {5 i a^{3} \cos \left (d x +c \right )}{d}+\frac {4 a^{3} \sin \left (d x +c \right )}{d}-\frac {3 a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.56, size = 82, normalized size = 1.34 \[ -\frac {2 i \, a^{3} {\left (\frac {1}{\cos \left (d x + c\right )} + \cos \left (d x + c\right )\right )} + 3 \, a^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right ) - 2 \, \sin \left (d x + c\right )\right )} + 6 i \, a^{3} \cos \left (d x + c\right ) - 2 \, a^{3} \sin \left (d x + c\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.64, size = 102, normalized size = 1.67 \[ -\frac {6\,a^3\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {8\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,2{}\mathrm {i}-10\,a^3}{d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.36, size = 109, normalized size = 1.79 \[ \frac {2 i a^{3} e^{i c} e^{i d x}}{- d e^{2 i c} e^{2 i d x} - d} + \frac {3 a^{3} \left (\log {\left (e^{i d x} - i e^{- i c} \right )} - \log {\left (e^{i d x} + i e^{- i c} \right )}\right )}{d} + \begin {cases} - \frac {4 i a^{3} e^{i c} e^{i d x}}{d} & \text {for}\: d \neq 0 \\4 a^{3} x e^{i c} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________